<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"><head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<!--
<input class="form-control" id="" name="" >
-->

<!-- 新增表单 -->
<form id="addForm">
    <div class="form-group">
     <!--   <input type="hidden" th:value="${hallId}" name="hallid"/>
        <input type="hidden" th:value="${playid}" name="playid"/>
        <input  type="hidden" id="movieid2" name="movieid"/>
        <input type="hidden"   id="md" name="playStartTime"/>
        <input type="hidden" th:value="${session.user.cinemaId}" name="cinemaid"/>
        <input type="hidden" id="ds" name="date"/>
-->
        <div class="row">
            <div class="col-md-2"><label>影院名称</label></div>
            <div class="col-md-4"><span class="x-red"  th:text="${session.user.cinema}"/></span> </div>
            <input type="hidden" id="sd" name="cinemaid" >
        </div>
    </div>
    <div class="form-group">
        <div class="row">
            <div class="col-md-2"><label>影厅名称</label></div>
            <div class="col-md-4"><select   class="form-control" id="playData2" name="hallid"></select> </div>
        </div>
    </div>
    <div class="form-group">
        <div class="row">
            <div class="col-md-2"><label>播放日期</label></div>
            <div class="col-md-4">  <input  type="text" class="form-control date" name="date" id="date" ></div>
        </div>
    </div>
    <div class="form-group">
        <div class="row">
            <div class="col-md-2"><label>电影名称</label></div>
            <div class="col-md-4"><select  class="form-control" id="movieid2" name="movieid"></select></div>
        </div>
    </div>
    <div class="form-group">
        <div class="row">
            <div class="col-md-2"><label>价格</label></div>
            <div class="col-md-4"><input  class="form-control" id="pric" name="moviePrice"></div>
        </div>
    </div>
    <div class="form-group">
        <div class="row">
            <div class="col-md-2"><label>语言</label></div>
            <div class="col-md-4"><input class="form-control"  name="movieLanguage" ></div>
        </div>
    </div>
    <div class="form-group">
        <div class="row">
            <div class="col-md-2"><label>播放时间</label></div>
            <div class="col-md-4"><input class="form-control" id="as"  onblur="sss()" name="playStartTime" ></div>
        </div>
    </div>
    <div class="form-group">
        <div class="row">
            <div class="col-md-2"><label>结束时间</label></div>
            <div class="col-md-4"><input readonly class="form-control" id="end" ></div>
        </div>
    </div>

</form>



</body>

<script>

    function sss(){
        var sd=$("#movieid2").val();
        if (sd != ''){
            $.ajax({
                url:"../plan/endDate",
                type:"get",
                data:{date:$("#as").val(),movid:sd},
                async:false,
                success:function(data){
                    $("#end").val(data)
                }
            })
        }
    }

    $(function(){
       var sdd= '[[${session.user.cinemaId}]]';

        $("#sd").val(sdd)

    })

    $('.date').datetimepicker({
        language: 'zh-CN',//显示中文
        //format: 'yyyy-mm-dd hh:ii:ss',//显示格式
        //minView: "day",//设置只显示到月份
        format: 'yyyy-mm-dd',//显示格式
        minView: "month",//设置只显示到月份
        initialDate: new Date(),//初始化当前日期
        autoclose: true,//选中自动关闭
        todayBtn: true,//显示今日按钮,
        endDate:"+3d",
        startDate:new Date(),



    });

    function ttt(movieId){
        $.ajax({
            url:"../plan/queryPrice",
            type:"get",
            data:{cinemaId: [[${session.user.cinemaId}]],movieId:movieId},
            async:false,
            success:function(data){
                $("#pric").val(data)
            }
        })
    }


</script>
</html>